package main

import (
	"strings"

	"io.zyj/caixukun/pkg/ascii"
	"io.zyj/caixukun/pkg/video"
)

//此程序仅在windows可用
func main() {
	//准备好路径
	videoFilePath := "H:\\1\\zyntm.flv"                                       //视频的路径
	videoDirectory := videoFilePath[0:strings.LastIndex(videoFilePath, "\\")] //视频所在文件夹路径
	picDirectory := videoDirectory + "\\pic"
	asciiDirectory := videoDirectory + "\\txt"
	fps := 15
	base := 920
	//1. 视频转图片
	video.ToPic(videoFilePath, picDirectory, fps)
	//2. 图片转字符动画
	ascii.BatchTransAscii(picDirectory, asciiDirectory)
	//3. 播放字符动画
	ascii.Play(asciiDirectory, fps, base)
}
